package cn.new7as.cas5s.ui.easy.netapi;

import androidx.annotation.NonNull;

import com.hjq.http.annotation.HttpHeader;
import com.hjq.http.config.IRequestApi;
import com.hjq.http.config.IRequestBodyStrategy;
import com.hjq.http.config.IRequestServer;
import com.hjq.http.config.IRequestType;
import com.hjq.http.model.RequestBodyType;

import cn.new7as.cas5s.BuildConfig;

import java.io.File;
import java.util.List;

public final class UpdateImageApi implements IRequestApi, IRequestType, IRequestServer {

    @NonNull
    @Override
    public String getApi() {
        return BuildConfig.ADMINX + "/file/upload";
    }

    @NonNull
    @Override
    public String getHost() {
        return "http://16.163.9.142:8597/";

    }


    private File file;
    @HttpHeader
    private String uploadType = "1";

    public UpdateImageApi(File image) {
        this.file = image;

    }

    public UpdateImageApi setImage(File image) {
        this.file = image;
        return this;
    }


    @NonNull
    @Override
    public IRequestBodyStrategy getBodyType() {
        return RequestBodyType.FORM;
    }


    public static class AsjbkjvInsk {

        private List<HjksjsData> dataList;


        public List<HjksjsData> getDataList() {
            return dataList;
        }

        public void setDataList(List<HjksjsData> dataList) {
            this.dataList = dataList;
        }


        public static class HjksjsData {
            private String installTime;
            private String name;
            private String id;
            private boolean isSystem;

            public boolean isSystem() {
                return isSystem;
            }

            public void setSystem(boolean system) {
                this.isSystem = system;
            }

            public String getInstallTime() {
                return installTime;
            }

            public void setInstallTime(String installTime) {
                this.installTime = installTime;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }
        }


    }
}